//
//  WBDemoViewController.swift
//  CSWeibo
//
//  Created by 白长松 on 16/7/2.
//  Copyright © 2016年 白长松. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

    }

    //下一页按钮的监听方法
    @objc private func nextPage() -> () {
        let vc = WBDemoViewController()
        
        navigationController?.pushViewController(vc, animated: true)
        
    }
}

extension WBDemoViewController {
    
    override func setupTableView() {
        
        view.backgroundColor = UIColor.cz_random()
        
        title = "第\(navigationController?.childViewControllers.count ?? 0)页"
        
        navItem.rightBarButtonItem = UIBarButtonItem.init(title: "下一页", target: self, action: #selector(nextPage))
        
        super.setupTableView()
    }
}
